﻿@{
    ViewBag.Title = "信息收集项目分类";
}
@section Header{
    @Scripts.Render("~/bundles/datatable")
    @Styles.Render("~/Content/datatable")
}
<ul class="nav nav-tabs">
    <li class="active"><a href="/InfoCollectCategory/">信息收集项目分类</a></li>
    <li class="Add-R"><a  href="/InfoCollectCategory/Edit/0">添加信息收集项目分类</a></li>
</ul>
<form id="searchForm" class="breadcrumb form-search">
    <div>
        <label>关键词：</label>
        <input id="Keyword" name="Keyword" class="input-medium" placeholder="请输入搜索关键词" type="text" value="" maxlength="50" />
        <input id="btnSubmit" class="btn btn-primary Search-R" type="button" value="查询" onclick="search();">
    </div>
</form>
<div class="table-responsive dataTables_wrapper">
    <table id="InfoCollectCategoryList" class="table table-striped table-bordered table-hover">
        <thead>
            <tr>
                <th width="20">序号</th>
                <th width="100">信息收集项目分类名称</th>
                <th width="100">操作</th>
            </tr>
        </thead>
    </table>
</div>
@section scripts{
    <script type="text/javascript">
        $(function () {
            var objTable = $("#InfoCollectCategoryList")
                .dataTable({
                    fnDrawCallback: function () {
                        ControlPermissionOperate();
                    },
                    "sAjaxSource": "/InfoCollectCategory",
                    aoColumns: [
                        {
                            "mData": null, "fnRender": function (nRow) {
                                return nRow.iDataRow + 1;
                            }
                        },
                        {
                            "mData": null, "fnRender": function (nRow) {
                                return "<a class='Edit-R'  href='/InfoCollectCategory/Edit/" + nRow.aData.ID + "' title='edit'>" + nRow.aData.InfoCollectCategoryName + "</a>";
                            }
                        },
                        { "mData": null }
                    ],
                    "fnRowCallback": function (nRow, aData, iDisplayIndex) {
                        var html = "<a class='Edit-R' href='/InfoCollectCategory/Edit/" + aData.ID + "' title='edit'><i class='icon-edit'></i></a>";
                        html += "<a class='Edit-R padding-l-5' href=\"javascript:DeleteObj('" + aData.ID + "','/InfoCollectCategory/Delete','InfoCollectCategoryList')\" title='删除'><i class='icon-trash red'></i></a>";
                        $('td:eq(2)', nRow).html(html);
                    }
                });
        });
        function search() {
            /*给查询对象赋值*/
            queryParamList.Keyword = ($("#Keyword").val()).trim();
            $("#InfoCollectCategoryList").dataTable().fnDraw();
        }

    </script>
}

